Skip to content

internal: Add support for 'sensitive' JSON tag for bundle config fields#5896

Open
andrewnester wants to merge 10 commits into
mainfrom
feat/sensitive-fields
Open

internal: Add support for 'sensitive' JSON tag for bundle config fields#5896
andrewnester wants to merge 10 commits into
mainfrom
feat/sensitive-fields

Conversation

@andrewnester

Copy link
Copy Markdown
Contributor

Changes

Add support for 'sensitive' JSON tag for bundle config fields

Why

This allows us to mark certain fields (for example, secrets.value) as sensitive and let CLI handle masking it in command outputs.

Used in #5861

Tests

Added unit tests. Will be tests end to end with unit tests with UC secrets

@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

Based on git history, these people are best suited to review:

  • @pietern -- recent work in libs/dyn/, libs/dyn/convert/, libs/dyn/yamlsaver/
  • @denik -- recent work in libs/dyn/, libs/dyn/convert/, libs/dyn/dynvar/

Eligible reviewers: @anton-107, @janniklasrose, @renaudhartert-db, @shreyas-goenka, @simonfaltum

Suggestions based on git history. See OWNERS for ownership rules.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 5ae8b6d

Run: 29496765607

Env 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 4 4 227 1105 5:32
💚​ aws windows 4 4 229 1103 7:00
💚​ aws-ucws linux 4 4 316 1021 9:27
💚​ aws-ucws windows 4 4 318 1019 7:53
🔄​ azure linux 2 3 4 226 1104 6:17
💚​ azure windows 4 4 229 1102 6:41
💚​ azure-ucws linux 4 4 318 1018 8:32
💚​ azure-ucws windows 4 4 320 1016 8:01
💚​ gcp linux 4 4 226 1106 5:16
💚​ gcp windows 4 4 228 1104 6:46
9 interesting tests: 4 SKIP, 3 RECOVERED, 2 flaky
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🔄​ TestSyncEnsureRemotePathIsUsableIfRepoExists ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p
🔄​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 🔄​f 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 10 slowest tests (at least 2 minutes):
duration env testname
6:34 aws windows TestAccept
6:25 azure-ucws windows TestAccept
6:22 gcp windows TestAccept
6:20 aws-ucws windows TestAccept
6:13 azure windows TestAccept
3:02 aws linux TestAccept
2:56 aws-ucws linux TestAccept
2:55 azure linux TestAccept
2:54 gcp linux TestAccept
2:50 azure-ucws linux TestAccept

Comment thread bundle/config/mask.go Outdated
Comment thread bundle/config/mask.go Outdated
Comment thread cmd/bundle/validate.go Outdated
Comment thread libs/dyn/convert/struct_info.go
Comment thread libs/dyn/convert/struct_info.go Outdated
}
return si.Sensitive
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a few unit tests here in dyn/convert that demonstrates that this works in cases with embedded structs, anonymous structs, etc. Would also be good to include a user of these fields in the same package.

Comment thread cmd/bundle/validate.go Outdated
Comment thread bundle/config/mask_test.go Outdated
Comment thread bundle/config/validate/no_reference_to_sensitive_fields.go Outdated
Comment thread libs/dyn/yamlsaver/saver.go Outdated
Comment thread libs/dyn/value.go Outdated
if info.Sensitive[k] {
nv = nv.MarkSensitive()
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "normalize" function doesn't retain the flag.

@andrewnester andrewnester requested a review from pietern July 15, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants